package com.thinkingcoder.tcconfig.client.repository;

import java.util.Map;

import com.thinkingcoder.tcconfig.client.config.ConfigMeta;
import com.thinkingcoder.tcconfig.client.listener.TcConfigChangListener;

/**
 * interface to get config from remote.
 */
public interface TcRepository {

    Map<String, String> getConfig();

    void addChangeListener(TcConfigChangListener changListener);

    static TcRepository getDefault(ConfigMeta configMeta) {
        return new TcRepositoryImpl(configMeta);
    }

}
